﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace EmptoolWebApp.Entities
{
    [Serializable]
    [DataContract]
    public class CompanyEntity : BaseTableEntity
    {
        public const string TABLE_NAME = "Company";

        #region constructor(s)
        public CompanyEntity() : base()
        {

        }

        public CompanyEntity(string companyName) : base()
        {
            if (string.IsNullOrWhiteSpace(companyName))
            {
                throw new ArgumentNullException("companyName");
            }

            this.PartitionKey = Helpers.CryptographyHelper.UserHash(companyName);
            this.CompanyName = companyName;
        }
        #endregion constructor(s)

        [DataMember]
        public string CompanyName { get; set; }

    }
}